#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int n = 0, m = 0, s = 0;
	while (~scanf("%d %d", &n, &m)) {
		s = n * m - 1;
		printf("%d\n", s);
	}
	return 0;
}
//1044